//Table 8. Short term credit before crisis

use "eseewithinfirm.dta", clear

local filename "table8"
xi: xtivreg2 lnval crisisXlonginvXdomfir longinvXdomfir i.catyr  , fe cluster(firmid indyear) partial(i.catyr)
outreg2 using "`filename'", word replace label  nocons dec(3) keep(crisisXlonginvXdomfir longinvXdomfir )
foreach var in shortfi shortfi2007  {
xi: xtivreg2 lnval crisisXlonginvX`var' longinvX`var' i.catyr , fe cluster(firmid indyear) partial(i.catyr)
outreg2 using "`filename'", word  label  nocons dec(3) keep(crisisXlonginvX* longinvX* )
}
